<template>
    <div class="header">
      <div class="header-left">
        <div class="iconfont back-icon">&#xe624;</div>
      </div>
      <div class="header-input">
        <span class="iconfont">&#xe632;</span>
        输入城市/景点/游玩主题
      </div>
      <div class="header-right">
        <router-link to="/city">{{this.$store.state.city}}</router-link>
        <span class="iconfont arrow-icon">&#xe64a;</span>
      </div>
    </div>
</template>

<script>
export default {
  name: 'Header'
}
</script>

<style lang="stylus" scoped>
  @import "~styles/varibles.styl"
  .header
    line-height:.86rem
    //设置line-height可以时文本居中
    display flex
    background $bgColor
    color: #ffffff
    .header-left
      width:.64rem
      float left
      .back-icon
        text-align center
        font-size .4rem
    .header-input
      //设置了line-height之后高度就出现问题了
      // 这里可以再次调整margin或者把行高写死
      // 这里的高度就等于行高
      flex:1
      height: .64rem
      line-height .64rem
      margin-top .12rem
      margin-left .2rem
      padding-left .2rem
      background #fff
      color #ccc
      border-radius .1rem
    .header-right
      min-width:1.04rem
      padding 0 .1rem
      margin-left .2rem
      /*float right*/
      color: #ffffff
      a
        color: #ffff
      .arrow-icon
        margin-left -.04rem
        font-size .24rem

</style>
